POV-Ray : Newsgroups : povray.general : Raytracing vs Scanline : Re: Raytracing vs Scanline Server Time
7 Aug 2024 21:21:26 EDT (-0400)
  Re: Raytracing vs Scanline  
From: Warp
Date: 1 Jun 2001 07:59:31
Message: <3b1783a2@news.povray.org>
Nekar Xenos <j-p### [at] citywalkcoza> wrote:
: Another dumb question. With all this talk about scanline rendering, I have
: difficulty visualising how it differs from raytracing. Could someone maybe draw
: me up a diagram to show the difference? Maybe a side view of a sphere and how
: the  ray is reflected,etc.

  Scanline rendering has nothing to do with raytracing. I'll try to list
the differences between raytracing and scanline rendering:

1. Scanline rendering works only with polygons (usually triangles) while
raytracing works only with mathematically defined objects.

2. Scanline rendering works by projecting the vertices of the polygons to
screen-space and then "filling" the 2D-polygons got from this (although
the depth information is used for texturing, z-buffering, etc). Raytracing
works by (mathematically) calculating the intersection of a line and the
mathematically defined object.

3. Due to the nature of scanline rendering reflections are very difficult
to calculate (they have to be "faked" in some way or another, eg. using
proper environment maps) and refraction is almost impossible. Also mutually
reflecting objects are extremely difficult. In raytracing reflection and
refraction are extremely easy to calculate (you just send additional rays).

4. In scanline rendering calculating shadows is not trivial either, but you
have to use rather complicated algorithms. In raytracing it's extremely
trivial. On the other hand, with certain scanline algorithms it's easier
to calculate smooth shadows of area lights accurately than it is in
raytracing (well, relatively speaking, as the shadow calculations are always
more complicated in scanline rendering).

5. Scanline rendering has also other problems which usually don't exist in
raytracing. These include different kinds of perspective correction (textures,
z-information, surface lighting, etc. have all be perspective corrected in
order to get a correct result), hidden surface removal, etc. In raytracing
you usually don't need to worry about perspective correction as, due to the
nature of the raytracing algorithm, you always get the right parameters.

6. Scanline rendering is usually much faster than raytracing (that's why
3D accelerator cards use it). This is because filling a polygon (even
when you need to make complicated perspective correction calculations) is
faster than calculating line-object-intersections with all the things it
needs.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.